<!-- 3d图片卡片 -->
<template>
  <div class="img-card">
    <div class="img-card-3dcontent">
      <div class="card">
        <p>3d图片卡片人像站立</p>
        <img src="@/assets/imgs/imgcard/cover.png" alt="" class="cover" />
        <img src="@/assets/imgs/imgcard/girl.png" alt="" class="girl" />
        <img src="@/assets/imgs/imgcard/txt.png" alt="" class="txt" />
      </div>
    </div>
  </div>
</template>

<script setup lang="ts"></script>

<style scoped lang="scss">
  .img-card {
    width: 100%;
    height: 100%;
    // background: var(--art-main-bg-color);
    // border-radius: calc(var(--custom-radius) / 2 + 2px) !important;
    // border: 1px solid var(--art-card-border) !important;
    display: flex;
    flex-wrap: wrap;
    .img-card-3dcontent {
      width: 250px;
      height: 323px;
      padding: 20px;
      border: 1px solid var(--art-card-border) !important;
      background-color: var(--art-main-bg-color);
      border-radius: calc(var(--custom-radius) + 4px) !important;
      transition: transform 0.2sease;
      margin: 10px;
      // display: flex;
      // justify-content: center;
      // align-items: center;
      .card {
        width: auto;
        height: 274px;
        position: relative;
        margin: 0 auto;
        p {
          font-weight: 600;
        }
      }

      .card img {
        position: absolute;
        width: 180px;
        //    height: 280px;
        top: 50px;
        left: 0;
      }

      .card .cover {
        height: 100%;
        z-index: 1;
        border-radius: 5px;
        transition: all 1s;
      }

      .card .girl {
        height: 100%;
        z-index: 2;
        opacity: 0;
        object-fit: cover;
        transition: all 1s;
      }
      .card .txt {
        //   width: 100%;
        width: 180px;
        height: 304px;
        opacity: 0;
        position: absolute;
        left: 0;
        z-index: 3;
        bottom: 0;
        filter: drop-shadow(2px 2px 2px #000);
        transition: all 0.75s;
      }
      .card:hover .cover {
        transform: perspective(600px) rotateX(30deg);
        box-shadow: 0 35px 35px -10px rgba(0, 0, 0, 0.75);
      }
      .card:hover .txt {
        opacity: 1;
        width: 200px;
        height: 280px;
        left: -10px;
        transform: perspective(300px) translate3d(0 -15px, 200px);
      }
      .card:hover .girl {
        opacity: 1;
        transform: perspective(300px) translate3d(0, -50px, 40px);
      }
    }
  }
</style>
